package pub.guoxin.oops.utils;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * Created by guoxin on 18-2-10.
 */
public class LocalDateUtils {
    public static final DateTimeFormatter yyMMddHHmmss = DateTimeFormatter.ofPattern("yyMMddHHmmss");

    public static LocalDateTime format(String localDateTime, DateTimeFormatter formatter) {
        return LocalDateTime.parse(localDateTime, formatter);
    }

    public static void main(String[] args) {
        LocalDateTime format = format("180210205930", yyMMddHHmmss);
        System.out.println(format);
    }
}
